package cn.edu.scau.cmi.dengzhengyu.client;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import cn.edu.scau.cmi.dengzhengyu.SimpleFactoryMethodPattern.*;
import cn.edu.scau.cmi.dengzhengyu.factoryMethodModel.*;
import cn.edu.scau.cmi.dengzhengyu.abstractFactoryModel.WensFactory;
import cn.edu.scau.cmi.dengzhengyu.abstractFactoryModel.domain.*;
import cn.edu.scau.cmi.dengzhengyu.abstractFactoryModel.domainAbstractClass.MeatProduct;

public class FactoryUIController {

    @FXML
    private Button btn_SF_pk;

    @FXML
    private Button btn_SF_ck;

    @FXML
    private TextArea text_1;

    @FXML
    private Button btn_SF_bf;
    
    @FXML
    private Button btn_F_pk;

    @FXML
    private Button btn_F_ck;

    @FXML
    private Button btn_F_bf;

    @FXML
    private TextArea text_2;
    
  
    @FXML
    void eventBtn_F_Chicken() {
    	text_2.appendText(new ChickenMeatFactory().getMeat().taste()+"\n");
    }

    @FXML
    void eventBtn_F_Beef() {
    	text_2.appendText(new BeefMeatFactory().getMeat().taste()+"\n");
    }

    @FXML
    void eventBtn_F_Pork() {
    	text_2.appendText(new PorkMeatFactory().getMeat().taste()+"\n");
    }
    
    
    
    
    public void eventBtn_SF_Pork()
    {	
    	text_1.appendText(new Pork().taste()+"\n");
    }
    
    public void eventBtn_SF_Beef()
    {	
    	
    	text_1.appendText(new Beef().taste()+"\n");
    }
    
    public void eventBtn_SF_Chicken()
    {	
    	
    	text_1.appendText(new Chicken().taste()+"\n");
    }

	
    @FXML
    private Button btn_AF_Ack;

    @FXML
    private Button btn_AF_Tbf;

    @FXML
    private Button btn_AF_Wbf;

    @FXML
    private Button btn_AF_Apk;

    @FXML
    private Button btn_AF_Tck;

    @FXML
    private TextArea text_3;

    @FXML
    private Button btn_AF_Wpk;

    @FXML
    private Button btn_AF_Wck;

    @FXML
    private Button btn_AF_Tpk;

    @FXML
    private Button btn_AF_Abf;

    @FXML
    void eventBtn_AF_WensChicken(ActionEvent event) {
    	text_3.appendText(new WensChicken().play()+"\n");
    	
    }
    

    @FXML
    void eventBtn_AF_WensBeef(ActionEvent event) {
    	text_3.appendText(new WensBeef().play()+"\n");
    }

    @FXML
    void eventBtn_AF_WensPork(ActionEvent event) {
    	text_3.appendText(new WensPork().play()+"\n");
    }

    @FXML
    void eventBtn_Aonongchicken(ActionEvent event) {
    	text_3.appendText(new AonongChicken().play()+"\n");
    }

    @FXML
    void eventBtn_AonongBeef(ActionEvent event) {
    	text_3.appendText(new AonongBeef().play()+"\n");
    }

    @FXML
    void eventBtn_AonongPork(ActionEvent event) {
    	text_3.appendText(new AonongPork().play()+"\n");
    }

    @FXML
    void eventBtn_AF_TianbangChicken(ActionEvent event) {
    	text_3.appendText(new TianbangChicken().play()+"\n");
    }

    @FXML
    void eventBtn_AF_TianbangBeef(ActionEvent event) {
    	text_3.appendText(new TianbangBeef().play()+"\n");
    }

    @FXML
    void eventBtn_AF_TianbangPork(ActionEvent event) {
    	text_3.appendText(new TianbangPork().play()+"\n");
    }
    
    @FXML
    private TextField text_title;

    @FXML
    private Button btn_2;

    @FXML
    private Button btn_1;

    @FXML
    private Button btn_3;
    
    @FXML
    public boolean eventBtn1()
    {
    	return true;
    }
    
    @FXML
    public boolean  eventBtn2()
    {
    	return true;
    }
    
    @FXML
    public boolean  eventBtn3()
    {
    	return true;
    }
  
    
   

	
}
